﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ReconCaracteres_Backpropagation
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            /*Double[] input= new Double[2];
            Double[] d = new Double[3];


            Double alpha = .8;
            int inputLayerNeuronsAmount = 3;
            int hiddenLayerNeuronsAmount = 3;
            int outputLayerNeuronsAmount = 3;
            BackPropagationNetwork b = new BackPropagationNetwork(alpha, inputLayerNeuronsAmount, hiddenLayerNeuronsAmount, outputLayerNeuronsAmount);
            b.inputLayer.loadAllInputWeights("Weights.txt");
            b.hiddenLayer.loadAllOutputWeights("Weights.txt");


            int iterationsCounter = 0;*/
           /* while(false==b.stopTrainningFlag)
            {
                b.stopTrainningFlag = true;

                input[0] = 0;
                input[1] = 1;
                d[0] = 0;
                d[1] = 0;
                d[2] = 1;


                b.propagateInput(input, d);

                input[0] = 1;
                input[1] = 0;
                d[0] = 0;
                d[1] = 0;
                d[2] = 0;

                b.propagateInput(input, d);
    
                input[0] = 1;
                input[1] = 1;
                d[0] = 0;
                d[1] = 1;
                d[2] = 1;

                b.propagateInput(input, d);

                iterationsCounter++;
            }*/

/*
            input[0] = 0.02;
            input[1] = 0.8;
            Double[] output=b.clasifyInput(input);
            foreach (Double i in output)
            {
                Console.Write("["+i+"]");
            }*/


        }

        private void crearPatrónToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreatePattenForm cp = new CreatePattenForm();
            cp.Show();
        }

        private void entrenarToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void entrenarRedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TrainningForm tf = new TrainningForm();
            tf.Show();
        }

        private void crearArchivoConTodosPatronesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreateFileWithAllPattens cf= new CreateFileWithAllPattens();
                cf.Show();
        
        }

        private void probarRedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Reconocer r = new Reconocer();
            r.Show();
        }

        private void salirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
